//---------------------------------------------------------------------------
#ifndef CDBListbH
#define CDBListbH
//---------------------------------------------------------------------------
#include "CtrlDB.h"
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include <DBCtrls.hpp>
#include <StdCtrls.hpp>
//---------------------------------------------------------------------------
class PACKAGE_CTRLDB CDBListBox : public TDBListBox
{
private:
  AnsiString                 m_asRefWebHelp;
  bool                       m_Enabled;
  bool                       m_ReadOnly;
  bool                       m_Obligatoire;
  TCorrectementRempliEvent   m_pfnOnEstCorrectementRempli;
  TWndMethod                 m_OldWndProc_Parent;
  TWinControl               *m_OldParent;
  bool                       m_BleuSiHint;

  void __fastcall SetRefWebHelp(const AnsiString asValeur) { m_asRefWebHelp = asValeur;};
  void __fastcall SetEnabled     (bool value);
  void __fastcall SetReadOnly    (bool value);
  void __fastcall SetObligatoire (bool value);
  void __fastcall WndProc_Parent (TMessage &Message);
  void __fastcall SetBleuSiHint (bool value);

protected:
  virtual void __fastcall SetParent(TWinControl* AParent);
  DYNAMIC void __fastcall KeyDown( Word &Key, TShiftState Shift);

public:
  __fastcall CDBListBox(TComponent* Owner);
  virtual __fastcall ~CDBListBox();
  bool __fastcall EstCorrectementRempliDefault( void);
__published:
  __property AnsiString  RefWebHelp   = {read = m_asRefWebHelp, write = SetRefWebHelp};
  __property bool Enabled      = { read=m_Enabled     , write=SetEnabled     , default=true  };
  __property bool ReadOnly     = { read=m_ReadOnly    , write=SetReadOnly    , default=false };
  __property bool Obligatoire  = { read=m_Obligatoire , write=SetObligatoire , default=false };
  __property TCorrectementRempliEvent OnEstCorrectementRempli = { read=m_pfnOnEstCorrectementRempli, write=m_pfnOnEstCorrectementRempli};
  __property bool BleuSiHint   = { read=m_BleuSiHint  , write=SetBleuSiHint  , default=false };
};
//---------------------------------------------------------------------------
#endif
